package com.a.a.a.b.a.b;

import com.a.a.a.a.b.a;
import com.a.a.a.a.b.b.f;
import com.a.a.a.a.b.b.g;
import com.a.a.a.a.b.b.h;
import com.a.a.a.a.b.b.j;
import com.a.a.a.a.b.b.k;
import com.a.a.a.a.b.b.l;
import com.a.a.a.a.b.b.m;
import com.a.a.a.a.c.c.t;
import com.a.a.a.a.c.c.u;
import com.a.a.a.b.a.a.b;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

public abstract class v
  extends M
{
  protected F a;
  
  public v(b paramb, F paramF)
  {
    super(paramb);
    this.a = paramF;
  }
  
  protected a c()
  {
    if (this.b.b() != com.a.a.a.b.a.c.bv) {
      return null;
    }
    this.b.k();
    a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.am });
    com.a.a.a.a.a.c localc = this.a.a();
    com.a.a.a.a.b.e locale = com.a.a.a.a.b.e.a;
    switch (w.a[this.b.b().ordinal()])
    {
    case 1: 
      locale = com.a.a.a.a.b.e.b;
    case 2: 
      this.b.k();
    }
    switch (w.a[this.b.b().ordinal()])
    {
    case 3: 
      this.b.k();
      b(new String[] { "ROLLUP" });
      return new a(localc, locale, true);
    case 4: 
      break;
    default: 
      return new a(localc, locale, false);
    }
    a locala = new a().a(localc, locale);
    while (this.b.b() == com.a.a.a.b.a.c.w)
    {
      this.b.k();
      locale = com.a.a.a.a.b.e.a;
      localc = this.a.a();
      switch (w.a[this.b.b().ordinal()])
      {
      case 1: 
        locale = com.a.a.a.a.b.e.b;
      case 2: 
        this.b.k();
      }
      locala.a(localc, locale);
      if (this.b.b() == com.a.a.a.b.a.c.el)
      {
        this.b.k();
        b(new String[] { "ROLLUP" });
        return locala.c();
      }
    }
    return locala;
  }
  
  protected com.a.a.a.a.b.d d()
  {
    if (this.b.b() != com.a.a.a.b.a.c.cL) {
      return null;
    }
    this.b.k();
    a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.am });
    com.a.a.a.a.a.c localc = this.a.a();
    com.a.a.a.a.b.e locale = com.a.a.a.a.b.e.a;
    com.a.a.a.a.b.d locald;
    switch (w.a[this.b.b().ordinal()])
    {
    case 1: 
      locale = com.a.a.a.a.b.e.b;
    case 2: 
      if (this.b.k() != com.a.a.a.b.a.c.w) {
        return new com.a.a.a.a.b.d(localc, locale);
      }
    case 4: 
      locald = new com.a.a.a.a.b.d();
      locald.a(localc, locale);
      break;
    }
    return new com.a.a.a.a.b.d(localc, locale);
    while (this.b.b() == com.a.a.a.b.a.c.w)
    {
      this.b.k();
      locale = com.a.a.a.a.b.e.a;
      localc = this.a.a();
      switch (w.a[this.b.b().ordinal()])
      {
      case 1: 
        locale = com.a.a.a.a.b.e.b;
      case 2: 
        this.b.k();
      }
      locald.a(localc, locale);
    }
    return locald;
  }
  
  protected List<com.a.a.a.a.a.f.d> a(com.a.a.a.a.a.f.d paramd)
  {
    if (this.b.b() != com.a.a.a.b.a.c.w)
    {
      localObject = new ArrayList(1);
      ((List)localObject).add(paramd);
      return localObject;
    }
    Object localObject = new LinkedList();
    ((List)localObject).add(paramd);
    while (this.b.b() == com.a.a.a.b.a.c.w)
    {
      this.b.k();
      paramd = m();
      ((List)localObject).add(paramd);
    }
    return localObject;
  }
  
  protected List<com.a.a.a.a.a.f.d> e()
  {
    return a(m());
  }
  
  protected List<String> f()
  {
    if (this.b.b() != com.a.a.a.b.a.c.c)
    {
      a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.q });
      return Collections.emptyList();
    }
    String str = this.b.v();
    if (this.b.k() == com.a.a.a.b.a.c.w)
    {
      localObject = new LinkedList();
      ((List)localObject).add(str);
      while (this.b.b() == com.a.a.a.b.a.c.w)
      {
        this.b.k();
        ((List)localObject).add(this.b.v());
        a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.c });
      }
    }
    Object localObject = new ArrayList(1);
    ((List)localObject).add(str);
    a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.q });
    return localObject;
  }
  
  protected List<String> g()
  {
    if ((this.b.b() != com.a.a.a.b.a.c.c) && (this.b.b() != com.a.a.a.b.a.c.cQ))
    {
      a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.q });
      return Collections.emptyList();
    }
    String str = this.b.v();
    if (this.b.k() == com.a.a.a.b.a.c.w)
    {
      localObject = new LinkedList();
      ((List)localObject).add(str);
      while (this.b.b() == com.a.a.a.b.a.c.w)
      {
        this.b.k();
        ((List)localObject).add(this.b.v());
        a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.c });
      }
    }
    Object localObject = new ArrayList(1);
    ((List)localObject).add(str);
    a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.q });
    return localObject;
  }
  
  protected com.a.a.a.a.b.b.n h()
  {
    m localm = a();
    return a(localm);
  }
  
  private com.a.a.a.a.b.b.n a(m paramm)
  {
    if (this.b.b() == com.a.a.a.b.a.c.w)
    {
      localObject = new LinkedList();
      ((List)localObject).add(paramm);
      while (this.b.b() == com.a.a.a.b.a.c.w)
      {
        this.b.k();
        paramm = a();
        ((List)localObject).add(paramm);
      }
    }
    Object localObject = new ArrayList(1);
    ((List)localObject).add(paramm);
    return new com.a.a.a.a.b.b.n((List)localObject);
  }
  
  private m a()
  {
    m localm = b();
    return b(localm);
  }
  
  private m b(m paramm)
  {
    for (;;)
    {
      boolean bool1 = false;
      boolean bool2 = true;
      m localm;
      com.a.a.a.a.a.c localc;
      List localList;
      switch (w.a[this.b.b().ordinal()])
      {
      case 10: 
      case 11: 
        this.b.k();
      case 9: 
        this.b.k();
        localm = b();
        switch (w.a[this.b.b().ordinal()])
        {
        case 5: 
          this.b.k();
          localc = this.a.a();
          paramm = new g(paramm, localm, localc);
          break;
        case 6: 
          this.b.k();
          a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.p });
          localList = f();
          paramm = new g(paramm, localm, localList);
          break;
        default: 
          paramm = new g(paramm, localm);
        }
        break;
      case 12: 
        this.b.k();
        localm = b();
        switch (w.a[this.b.b().ordinal()])
        {
        case 5: 
          this.b.k();
          localc = this.a.a();
          paramm = new j(paramm, localm, localc);
          break;
        default: 
          paramm = new j(paramm, localm);
        }
        break;
      case 7: 
        bool2 = false;
      case 8: 
        this.b.k();
        if (this.b.b() == com.a.a.a.b.a.c.cN) {
          this.b.k();
        }
        a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.bW });
        localm = a();
        switch (w.a[this.b.b().ordinal()])
        {
        case 5: 
          this.b.k();
          localc = this.a.a();
          paramm = new com.a.a.a.a.b.b.i(bool2, paramm, localm, localc);
          break;
        case 6: 
          this.b.k();
          a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.p });
          localList = f();
          paramm = new com.a.a.a.a.b.b.i(bool2, paramm, localm, localList);
          break;
        default: 
          Object localObject = localm.a_();
          if ((localObject instanceof com.a.a.a.a.a.c)) {
            paramm = new com.a.a.a.a.b.b.i(bool2, paramm, localm, (com.a.a.a.a.a.c)localObject);
          } else if ((localObject instanceof List)) {
            paramm = new com.a.a.a.a.b.b.i(bool2, paramm, localm, (List)localObject);
          } else {
            throw a("conditionExpr cannot be null for outer join");
          }
          break;
        }
        break;
      case 13: 
        this.b.k();
        switch (w.a[this.b.b().ordinal()])
        {
        case 7: 
          bool2 = false;
        case 8: 
          this.b.k();
          if (this.b.b() == com.a.a.a.b.a.c.cN) {
            this.b.k();
          }
          bool1 = true;
        case 9: 
          this.b.k();
          localm = b();
          paramm = new h(bool1, bool2, paramm, localm);
          break;
        default: 
          throw a("unexpected token after NATURAL for natural join:" + this.b.b());
        }
        break;
      default: 
        return paramm;
      }
    }
  }
  
  private m b()
  {
    String str = null;
    switch (w.a[this.b.b().ordinal()])
    {
    case 14: 
      this.b.k();
      Object localObject = q();
      a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.q });
      if ((localObject instanceof com.a.a.a.a.a.e.c))
      {
        str = i();
        return new k((com.a.a.a.a.a.e.c)localObject, str);
      }
      return (com.a.a.a.a.b.b.n)localObject;
    case 15: 
      com.a.a.a.a.a.f.d locald = m();
      str = i();
      List localList = r();
      return new l(locald, str, localList);
    }
    throw a("unexpected token for tableFactor: " + this.b.b());
  }
  
  protected String i()
  {
    if (this.b.b() == com.a.a.a.b.a.c.ad) {
      this.b.k();
    }
    StringBuilder localStringBuilder = new StringBuilder();
    int i = 0;
    if (this.b.b() == com.a.a.a.b.a.c.c)
    {
      localStringBuilder.append(this.b.v());
      i = 1;
      this.b.k();
    }
    if ((this.b.b() == com.a.a.a.b.a.c.j) && ((i == 0) || ((i != 0) && (localStringBuilder.charAt(0) == '_'))))
    {
      localStringBuilder.append(this.b.v());
      this.b.k();
    }
    return localStringBuilder.length() > 0 ? localStringBuilder.toString() : null;
  }
  
  private Object q()
  {
    Object localObject1;
    switch (w.a[this.b.b().ordinal()])
    {
    case 16: 
      localObject2 = j();
      return a((com.a.a.a.a.c.c.n)localObject2);
    case 14: 
      this.b.k();
      localObject1 = q();
      a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.q });
      if ((localObject1 instanceof com.a.a.a.a.a.e.c))
      {
        if ((localObject1 instanceof com.a.a.a.a.c.c.n))
        {
          localObject3 = a((com.a.a.a.a.c.c.n)localObject1);
          if (localObject3 != localObject1) {
            return localObject3;
          }
        }
        Object localObject3 = i();
        if (localObject3 != null) {
          localObject1 = new k((com.a.a.a.a.a.e.c)localObject1, (String)localObject3);
        } else {
          return localObject1;
        }
      }
      localObject1 = b((m)localObject1);
      break;
    default: 
      localObject1 = a();
    }
    if (this.b.b() == com.a.a.a.b.a.c.w)
    {
      localObject2 = new LinkedList();
      ((List)localObject2).add((m)localObject1);
      while (this.b.b() == com.a.a.a.b.a.c.w)
      {
        this.b.k();
        localObject1 = a();
        ((List)localObject2).add((m)localObject1);
      }
      return new com.a.a.a.a.b.b.n((List)localObject2);
    }
    Object localObject2 = new ArrayList(1);
    ((List)localObject2).add((m)localObject1);
    return new com.a.a.a.a.b.b.n((List)localObject2);
  }
  
  private List<com.a.a.a.a.b.b.c> r()
  {
    com.a.a.a.a.b.b.c localc1 = s();
    if (localc1 == null) {
      return null;
    }
    com.a.a.a.a.b.b.c localc2 = s();
    if (localc2 == null)
    {
      localObject = new ArrayList(1);
      ((List)localObject).add(localc1);
      return localObject;
    }
    Object localObject = new LinkedList();
    ((List)localObject).add(localc1);
    ((List)localObject).add(localc2);
    while ((localc2 = s()) != null) {
      ((List)localObject).add(localc2);
    }
    return localObject;
  }
  
  private com.a.a.a.a.b.b.c s()
  {
    com.a.a.a.a.b.b.d locald;
    switch (w.a[this.b.b().ordinal()])
    {
    case 17: 
      locald = com.a.a.a.a.b.b.d.a;
      break;
    case 18: 
      locald = com.a.a.a.a.b.b.d.b;
      break;
    case 19: 
      locald = com.a.a.a.a.b.b.d.c;
      break;
    default: 
      return null;
    }
    f localf;
    switch (w.a[this.b.k().ordinal()])
    {
    case 20: 
      localf = f.a;
      break;
    case 21: 
      localf = f.b;
      break;
    default: 
      throw a("must be INDEX or KEY for hint type, not " + this.b.b());
    }
    com.a.a.a.a.b.b.e locale = com.a.a.a.a.b.b.e.a;
    if (this.b.k() == com.a.a.a.b.a.c.bo) {
      switch (w.a[this.b.k().ordinal()])
      {
      case 9: 
        this.b.k();
        locale = com.a.a.a.a.b.b.e.b;
        break;
      case 22: 
        this.b.k();
        a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.am });
        locale = com.a.a.a.a.b.b.e.d;
        break;
      case 23: 
        this.b.k();
        a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.am });
        locale = com.a.a.a.a.b.b.e.c;
        break;
      default: 
        throw a("must be JOIN or ORDER or GROUP for hint scope, not " + this.b.b());
      }
    }
    a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.p });
    List localList = g();
    return new com.a.a.a.a.b.b.c(locald, localf, locale, localList);
  }
  
  protected com.a.a.a.a.c.c.i a(com.a.a.a.a.c.c.n paramn)
  {
    if (this.b.b() != com.a.a.a.b.a.c.dS) {
      return paramn;
    }
    t localt = new t(paramn);
    u localu = u.a;
    while (this.b.b() == com.a.a.a.b.a.c.dS)
    {
      this.b.k();
      switch (w.a[this.b.b().ordinal()])
      {
      case 24: 
        localu = u.b;
        this.b.k();
        break;
      case 25: 
        localu = u.c;
        this.b.k();
        break;
      }
      paramn = a(true);
      localt.a(paramn, localu);
    }
    localt.a(d()).a(o());
    return localt;
  }
  
  protected com.a.a.a.a.c.c.n a(boolean paramBoolean)
  {
    switch (w.a[this.b.b().ordinal()])
    {
    case 16: 
      if (paramBoolean) {
        return b(true);
      }
      return k();
    case 14: 
      this.b.k();
      com.a.a.a.a.c.c.n localn = a(false);
      a(new com.a.a.a.b.a.c[] { com.a.a.a.b.a.c.q });
      return localn;
    }
    throw a("unexpected token: " + this.b.b());
  }
  
  protected com.a.a.a.a.c.c.n j()
  {
    return a(false);
  }
  
  public com.a.a.a.a.c.c.n k()
  {
    return b(false);
  }
  
  public com.a.a.a.a.c.c.n b(boolean paramBoolean)
  {
    return new z(this.b, this.a).b(paramBoolean);
  }
  
  public com.a.a.a.a.c.c.i l()
  {
    return new z(this.b, this.a).l();
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.a.a.a.b.a.b.v
 * JD-Core Version:    0.7.0.1
 */